var getCookie = function(name) {
    var cookieArr = document.cookie.split(";");
    for(var i = 0; i < cookieArr.length; i++) {
        var cookiePair = cookieArr[i].split("=");
        if(name == cookiePair[0].trim()) {
            return decodeURIComponent(cookieArr[i].replace(cookiePair[0]+'=',''));
        }
    }
    return null;
}

var MAGIC_EDITOR_CONFIG = {
    title: 'Base WiwfEditor',
    header: {
        skin: true,
        document: true,
        repo: false,
        qqGroup: false,
    },
    theme: 'gray-new',
    defaultExpand: false,
    checkUpdate: false,
    getMagicTokenValue: function(){
      return getCookie('ztoken');  
    },
}
